package com.xxg.renrenshop.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 查询商品Dao
 *
 * @author xuxiaogang
 * @date 2021-11-17
 */
@Mapper
@Component
public interface RenrenShopGoodsDao {
    @Select("select id,title,thumb,price,min_price as minPrice,max_price as maxPrice,cost_price as costPrice from renren_shop_goods where shop_id = #{shopId} and is_deleted=0 limit 3")
    List<RenrenShopGoods> getGoods(@Param("shopId") Integer shopId);
}